-
Notifications
You must be signed in to change notification settings - Fork 81
AAP-51350 Support Django 5.2 as well as Django 4.y #855
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: devel
Are you sure you want to change the base?
Conversation
Documenting:
|
Link #213 |
@ttuffin asking for your advisement on SonarCloud coverage data here. This reports that the new method isn't covered. This is somewhat obvious, because it is added for compatibility, and whatever the existing config is doing seems to only get coverage from one run. But clearly different runs in the matrix will cover different lines in code - otherwise why would we have a matrix?! This is where a coverage requirement becomes very murky, as it gets highly highly configuration dependent. Do you want coverage to be gathered from all runs and combined? We have a clear preference, which is that we only "care" about Django 5, as the compatibility stuff is temporary, but cannot be avoided. Getting coverage for version-specific stuff is extra work and doesn't necessarily provide any value. |
Tests I added meaningfully covered the non-trivial code related to processing of multiple querysets passed in. This seems pretty solid now. |
@AlanCoding one potential solution could be to update the CI to generate coverage reports for each run, aggregate them and then send that aggregated report to SonarCloud. I am not sure what the long-term plan is for supporting Django 4 in dab, but I imagine we may still need add potential bug/CVE fixes in the future? In which case having coverage for Django 4 related code would be advantageous. Aggregated coverage reports is not something we covered in the initial proposal - perhaps it would be good to add some guidance around that. All that said, I am happy to leave something like this to the discretion of the PDT's since you know your codebase best. In this particular case, SonarCloud appears to be getting caught up on code that you consider to be temporary for backwards compatibility purposes only, in which case I don't see a problem in excluding it with HTH. If you think we should have better guidance about this from the SIG I'd be happy to raise it for discussion. |
No it will not. We only need this temporarily in a mid-release sense. We need Django 4 support in this branch, only as a matter of branch management. It is a big undertaking to get users of DAB to upgrade, and may take a month or more. I'll try to add NOSONAR |
DVCS PR Check Results: PR appears valid (JIRA key(s) found) |
|
Description
Looking to get DAB CI passing with Django 5 & 4 for the compatibility phase.
Type of Change
Note
Adds Django 5.2 support (while keeping Django 4.x), updates requirements, adapts prefetch API, expands CI/tox matrices, adds tests, and includes a help_text-only migration.
ansible_base/resource_registry/fields.py
to useget_prefetch_querysets(...)
with a Django 4 compatibility wrapperget_prefetch_queryset(...)
.Django
requirement to>=4.2.21,<6.0
; pin dev/lock todjango==5.2.7
.py310-django4
,py311-django4
,py312-django4
.requirements/updater.sh
: add safety check to require running fromrequirements/
dir.dab_rbac
migration0009_objectrole_help_text_change.py
to adjustObjectRole.users
and.teams
help_text
.prefetch_related
acrossorganization__resource
chains and toresource__content_type__resource_type
.Written by Cursor Bugbot for commit 367c49f. This will update automatically on new commits. Configure here.